<html>
<head>
	%{--<meta name='layout' content='main'/>--}%
	<title>用户登录</title>
    <r:require modules="auth" />
    <r:layoutResources />
</head>

<body>
<div id='login'>
	<div class='inner'>
		<div class='fheader'>用户登录</div>

		<g:if test='${flash.message}'>
			<div class='login_message'>${flash.message}</div>
		</g:if>

		<form action='${postUrl}' method='POST' id='loginForm' class='cssform' autocomplete='off'>

            <div id="errorMsg"></div>

			<p>
				<label for='username'>用户名:</label>
				<input type='text' class='text_' name='j_username' id='username' required />
			</p>

			<p>
				<label for='password'>密&nbsp&nbsp&nbsp码:</label>
				<input type='password' class='text_' name='j_password' id='password' check-type="required" required-message="密码不能为空！" />
			</p>

			<p id="remember_me_holder">
				<input type='checkbox' class='chk' name='${rememberMeParameter}' id='remember_me' <g:if test='${hasCookie}'>checked='checked'</g:if>/>
				<label for='remember_me'>记住我</label>
			</p>

            <p>
				<input type='submit' id="submit" value='登录' />
                <input type="button" id="registerBtn" value="注册" onclick="javascript:location.href='register.jsp'" />
			</p>
		</form>
	</div>
</div>

<r:script>
    var loginModel = new POF.auth.loginModel();
    new POF.auth.loginView({model: loginModel, el: $("#login")});
</r:script>

<r:layoutResources />
</body>
</html>
